package cn.gjxblog.core.social.qq.config;

import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.social.security.SpringSocialConfigurer;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/1/18 11:39
 */
public class MySpringSocialConfig extends SpringSocialConfigurer {

    private String filterProcesseUrl;

    public MySpringSocialConfig(String filterProcesseUrl) {
        this.filterProcesseUrl = filterProcesseUrl;
    }

    @Override
    protected <T> T postProcess(T object) {
     SocialAuthenticationFilter filter = (SocialAuthenticationFilter)super.postProcess(object);
     filter.setFilterProcessesUrl(filterProcesseUrl);
        return (T)filter;
    }
}
